<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/common.css"/>    
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/main.css"/>    
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/Validform_v5.3.2_min.css"/>    
    <script type="text/javascript" src="/Public/static/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/libs/modernizr.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/libs/modernizr.min.js"></script>
    <script src="/Public/Admin/js/validateForm.js" ></script>
    <script type="text/javascript" src="/Public/Admin/js/Validform_v5.3.2_min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/libs/alertAndConfirm.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/jquery.uploadify.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/jquery.uploadify.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Public/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Public/ueditor/ueditor.all.min.js"></script>
    <script>
   Validator.ExtraRight = "<img src=\"/Public/Admin/images/check_right.gif\">&nbsp;"; //!!!! 此变量必须重新指定，默认为空值，请把它改成当验证成功时你想要显示的图标 !!!!//
   Validator.ExtraError = "<img src=\"/Public/Admin/images/check_error.gif\">&nbsp;"; //!!!! 此变量必须重新指定，默认为空值，请把它改成当验证失败时你想要显示的图标 !!!!//

</script>
</head>
<style type="text/css">
.pages {

    margin: 20px 350px;
}
.pages a,.pages span {
    display:inline-block;
    padding:2px 5px;
    margin:0 1px;
    border:1px solid #f0f0f0;
    -webkit-border-radius:3px;
    -moz-border-radius:3px;
    border-radius:3px;
}
.pages a,.pages li {
    display:inline-block;
    list-style: none;
    text-decoration:none; color:#58A0D3;
}
.pages a.first,.pages a.prev,.pages a.next,.pages a.end{
    margin:0;
}
.pages a:hover{
    border-color:#50A8E6;
}
.pages span.current{
    background:#50A8E6;
    color:#FFF;
    font-weight:700;
    border-color:#50A8E6;
}
</style>
<body>

<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li><a class="on" href="/Admin">首页</a></li>
                <li><a href="http://hubao.ynten.com/" target="_blank">网站首页</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <?php if($_SESSION['adminname']): ?><li style="color:red"> 欢迎你：Admin</li>
                <?php else: ?> <li> 管理员</li><?php endif; ?>
                <li><a href="/Admin/Login/editpwd">修改密码</a></li>
                <li><a href="/Admin/Login/profile">修改资料</a></li>
                <li><a href="/Admin/Login/logout">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-content">
            <ul class="sidebar-list">
                 <li>
                    <a href="#"><i class="icon-font">&#xe003;</i>系统设置</a>
                    <ul class="sub-menu">
                        <li><a href="<?php echo U('Other/index');?>"><i class="icon-font">&#xe008;</i>信息设置</a></li>
                        <li><a href="<?php echo U('Site/index');?>"><i class="icon-font">&#xe006;</i>网站设置</a></li>
						<li><a href="<?php echo U('Waiter/index');?>"><i class="icon-font">&#xe005;</i>客服设置</a></li>
                        <li><a href="<?php echo U('Site/flash');?>"><i class="icon-font">&#xe007;</i>幻灯管理</a></li>
                        <li><a href="<?php echo U('Url/index');?>"><i class="icon-font">&#xe009;</i>友情链接</a></li>
                        <li><a href="<?php echo U('Waiter/message');?>"><i class="icon-font">&#xe025;</i>短信邮箱账号</a></li>
                    </ul>
                </li>

			<li>
                    <a href="#"><i class="icon-font">&#xe035;</i>银行卡管理</a>
                    <ul class="sub-menu">
                        <li><a href="<?php echo U('Card/index');?>"><i class="icon-font">&#xe036;</i>银行卡列表</a></li>
                        <li><a href="<?php echo U('Card/insert');?>"><i class="icon-font">&#xe038;</i>银行卡添加</a></li>
                    </ul>
                </li>
		<!--  		<li>
                    <a href="#"><i class="icon-font">&#xe015;</i>财务审核</a>
                    <ul class="sub-menu">
                        <li><a href="/Admin/Gongshi/index"><i class="icon-font">&#xe034;</i>计划审核</a></li>
                        <li><a href="/Admin/Huo/index"><i class="icon-font">&#xe034;</i>活动审核</a></li>
                        <li><a href="/Admin/User/xian"><i class="icon-font">&#xe028;</i>提现订单</a></li>
                        <li><a href="#"><i class="icon-font">&#xe032;</i>财务总览</a></li>
                    </ul>
                </li>
                <li>
                    <a href="#"><i class="icon-font">&#xe018;</i>公文配置</a>
                    <ul class="sub-menu">
                        <li><a href="/Admin/Gong/updatelc"><i class="icon-font">&&#xe022;</i>互保流程</a></li>
                        <li><a href="/Admin/Gong/index"><i class="icon-font">&#xe021;</i>互保公约</a></li>
                    </ul>
                </li> -->
				<li>
                    <a href="#"><i class="icon-font">&#xe050;</i>用户</a>
                    <ul class="sub-menu">
					    <li><a href="/Admin/User/index"><i class="icon-font">&#xe008;</i>会员中心</a></li>
						<!-- <li><a href="/Admin/Admin"><i class="icon-font">&#xe005;</i>管理员</a></li> -->
                        <!-- <li><a href="system.html"><i class="icon-font">&#xe031;</i>信用中心</a></li> -->
                        <!-- <li><a href="/Admin/Userfan/index"><i class="icon-font">&#xe039;</i>用户反馈</a></li> -->
                    </ul>
                </li>
                 <li>
                    <a href="#"><i class="icon-font">&#xe050;</i>管理员</a>
                    <ul class="sub-menu">
                        <li><a href="/Admin/Rbac/index"><i class="icon-font">&#xe008;</i>管理员</a></li>
                        <li><a href="/Admin/Rbac/role"><i class="icon-font">&#xe005;</i>角色管理</a></li>
                        <li><a href="/Admin/Rbac/jurisdiction"><i class="icon-font">&#xe039;</i>节点管理</a></li>
                    </ul>
                </li>
                 <li>
                    <a href="#"><i class="icon-font">&#xe018;</i>数据库备份</a>
                    <ul class="sub-menu">
                        <li><a href="/Admin/Bak/index"><i class="icon-font">&&#xe022;</i>数据备份</a></li>
                       <!--  <li><a href="/Admin/Gong/index"><i class="icon-font">&#xe021;</i>互保公约</a></li> -->
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    
    <!--/sidebar-->

<style type="text/css">
    p{
    width:700px;
    /*height:100px;*/
    text-indent:2em;
    line-height:150%;
    margin:5px 0 0;
}
p a{
    color:#FDCD3D;
}
</style>
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"> <i class="icon-font"></i>
                <a href="/Admin/Url">首页</a>
                <span class="crumb-step">&gt;</span>
                <span class="crumb-name">信息管理</span>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="/Admin/Url/insert"> <i class="icon-font"></i>
                            新增
                        </a>
<!--                         <a id="batchDel" href="javascript:void(0)">
                            <i class="icon-font"></i>
                            批量删除
                        </a> -->
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <!-- <th class="tc" width="5%"> -->
                                <!-- <input class="allChoose" name="" type="checkbox"></th> -->
                            <th>排序</th>
                            <th>ID</th>
                            <th>名称</th>
                            <th>url</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        <?php if(is_array($list)): foreach($list as $key=>$vo): ?><tr>
                       <td>
                        <input class="common-input sort-input sort" name="sort[]"  onblur="doblur(this,<?php echo ($vo['id']); ?>)"  value="<?php echo ($vo["sort"]); ?>" type="text">
                       </td>
                        <td><?php echo ($vo["id"]); ?></td>
                        <td><p><?php echo ($vo["title"]); ?></p></td>
                        <td><p><?php echo ($vo["url"]); ?></p></td>
                        <?php if(($vo["status"] == 1)): ?><td><a href="javascript:sta(<?php echo ($vo["id"]); ?>,0)" title="">开启</a></td>
                              <?php else: ?> <td><a href="javascript:sta(<?php echo ($vo["id"]); ?>,1)" title="">关闭</a></td><?php endif; ?>
                        <td>
                            <a class="link-update" href="<?php echo U('Admin/Url/edit/id/'.$vo['id']);?>">编辑</a>
                            <a class="link-del" href="javascript:del(<?php echo ($vo['id']); ?>)">删除</a>
                        </td>
                    </tr><?php endforeach; endif; ?>
                </table>
                <div class="list-page"><?php echo ($page); ?></div>
            </div>
        </form>
    </div>
</div>
<script>
function del(id){
            //删除 商品 漂亮的提示信息
            $.MsgBox.Confirm("删除提示", "执行后将无法恢复，确定继续吗？温馨提示", function() { 
                //发送 当前商品的id 和当前用户帐号
                $.post("/Admin/Url/delete",{'sid':id},function(data){
                     $.MsgBox.Alert("消息", data);
                    location.reload();
                });
            })
        }
function doblur(s,id){
    var yh = $.trim($(s).val()); 
         $.MsgBox.Confirm("修改提示", "确定继续吗？温馨提示", function() { 
        $.post('/Admin/Url/sort', {type:id,val:yh}, function(data) {
            $.MsgBox.Alert("消息", data);
            location.reload();
            });
            })
        }


function sta(sid,sta){
     $.MsgBox.Confirm("修改提示", "确定继续吗？温馨提示", function() { 
            $.post('/Admin/Url/status', {sid:sid,sta:sta}, function(data) {
                // alert(data);
                $.MsgBox.Alert("消息", data);
                location.reload();
                });
                })
        }
</script>







    <!--/main-->
    <script>
  $(function(){
    // $('ul.sub-menu').hide();
        $('ul.sidebar-list>li>a').click(function(){
            $(this).next().toggle();
        })
    })
    </script>
</div>
</body>
</html>